import request from "@/api";

export const addMenuApi = (data: MenuRequest): Promise<OwnAxiosResponse<null>> => {
    return request.post('/api/menu/add', data)
}

export const getMenuListApi = (): Promise<OwnAxiosResponse<null>> => {
    return request.get('/api/menu/get')
}

export const deleteMenuApi = (menuId: string | number): Promise<OwnAxiosResponse<boolean>> => {
    return request.delete(`/api/menu/delete/${menuId}`)
}

export const updateMenuApi = (menuId: string | number, data: MenuRequest): Promise<OwnAxiosResponse<boolean>> => {
    return request.put(`/api/menu/update/${menuId}`, data)
}

